.class public Lweibo4android/Count;
.super Ljava/lang/Object;
.source "Count.java"

# interfaces
.implements Ljava/io/Serializable;


# static fields
.field private static final serialVersionUID:J = 0x7df5effd39a1e485L


# instance fields
.field private comments:J

.field private dm:J

.field private followers:J

.field private id:J

.field private mentions:J

.field private rt:J


# direct methods
.method constructor <init>(Lweibo4android/http/Response;)V
    .locals 5
    .parameter "res"
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Lweibo4android/WeiboException;
        }
    .end annotation

    .prologue
    .line 42
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    .line 43
    invoke-virtual {p1}, Lweibo4android/http/Response;->asJSONObject()Lweibo4android/org/json/JSONObject;

    move-result-object v1

    .line 45
    .local v1, json:Lweibo4android/org/json/JSONObject;
    :try_start_0
    const-string v2, "id"

    invoke-virtual {v1, v2}, Lweibo4android/org/json/JSONObject;->getLong(Ljava/lang/String;)J

    move-result-wide v2

    iput-wide v2, p0, Lweibo4android/Count;->id:J

    .line 46
    const-string v2, "comments"

    invoke-virtual {v1, v2}, Lweibo4android/org/json/JSONObject;->getLong(Ljava/lang/String;)J

    move-result-wide v2

    iput-wide v2, p0, Lweibo4android/Count;->comments:J

    .line 47
    const-string v2, "rt"

    invoke-virtual {v1, v2}, Lweibo4android/org/json/JSONObject;->getLong(Ljava/lang/String;)J

    move-result-wide v2

    iput-wide v2, p0, Lweibo4android/Count;->rt:J

    .line 48
    const-string v2, "dm"

    invoke-virtual {v1, v2}, Lweibo4android/org/json/JSONObject;->getLong(Ljava/lang/String;)J

    move-result-wide v2

    iput-wide v2, p0, Lweibo4android/Count;->dm:J

    .line 49
    const-string v2, "mentions"

    invoke-virtual {v1, v2}, Lweibo4android/org/json/JSONObject;->getLong(Ljava/lang/String;)J

    move-result-wide v2

    iput-wide v2, p0, Lweibo4android/Count;->mentions:J

    .line 50
    const-string v2, "followers"

    invoke-virtual {v1, v2}, Lweibo4android/org/json/JSONObject;->getLong(Ljava/lang/String;)J

    move-result-wide v2

    iput-wide v2, p0, Lweibo4android/Count;->followers:J
    :try_end_0
    .catch Lweibo4android/org/json/JSONException; {:try_start_0 .. :try_end_0} :catch_0

    .line 57
    return-void

    .line 52
    :catch_0
    move-exception v0

    .line 53
    .local v0, je:Lweibo4android/org/json/JSONException;
    new-instance v2, Lweibo4android/WeiboException;

    new-instance v3, Ljava/lang/StringBuilder;

    invoke-virtual {v0}, Lweibo4android/org/json/JSONException;->getMessage()Ljava/lang/String;

    move-result-object v4

    invoke-static {v4}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v4

    invoke-direct {v3, v4}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    const-string v4, ":"

    invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v3

    invoke-virtual {v1}, Lweibo4android/org/json/JSONObject;->toString()Ljava/lang/String;

    move-result-object v4

    invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v3

    invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v3

    invoke-direct {v2, v3, v0}, Lweibo4android/WeiboException;-><init>(Ljava/lang/String;Ljava/lang/Exception;)V

    throw v2
.end method

.method public constructor <init>(Lweibo4android/org/json/JSONObject;)V
    .locals 2
    .parameter "json"
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Lweibo4android/WeiboException;,
            Lweibo4android/org/json/JSONException;
        }
    .end annotation

    .prologue
    .line 34
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    .line 35
    const-string v0, "id"

    invoke-virtual {p1, v0}, Lweibo4android/org/json/JSONObject;->getLong(Ljava/lang/String;)J

    move-result-wide v0

    iput-wide v0, p0, Lweibo4android/Count;->id:J

    .line 36
    const-string v0, "comments"

    invoke-virtual {p1, v0}, Lweibo4android/org/json/JSONObject;->getLong(Ljava/lang/String;)J

    move-result-wide v0

    iput-wide v0, p0, Lweibo4android/Count;->comments:J

    .line 37
    const-string v0, "rt"

    invoke-virtual {p1, v0}, Lweibo4android/org/json/JSONObject;->getLong(Ljava/lang/String;)J

    move-result-wide v0

    iput-wide v0, p0, Lweibo4android/Count;->rt:J

    .line 38
    const-string v0, "dm"

    invoke-virtual {p1, v0}, Lweibo4android/org/json/JSONObject;->getLong(Ljava/lang/String;)J

    move-result-wide v0

    iput-wide v0, p0, Lweibo4android/Count;->dm:J

    .line 39
    const-string v0, "mentions"

    invoke-virtual {p1, v0}, Lweibo4android/org/json/JSONObject;->getLong(Ljava/lang/String;)J

    move-result-wide v0

    iput-wide v0, p0, Lweibo4android/Count;->mentions:J

    .line 40
    const-string v0, "followers"

    invoke-virtual {p1, v0}, Lweibo4android/org/json/JSONObject;->getLong(Ljava/lang/String;)J

    move-result-wide v0

    iput-wide v0, p0, Lweibo4android/Count;->followers:J

    .line 41
    return-void
.end method

.method static constructCounts(Lweibo4android/http/Response;)Ljava/util/List;
    .locals 8
    .parameter "res"
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Lweibo4android/http/Response;",
            ")",
            "Ljava/util/List",
            "<",
            "Lweibo4android/Count;",
            ">;"
        }
    .end annotation

    .annotation system Ldalvik/annotation/Throws;
        value = {
            Lweibo4android/WeiboException;
        }
    .end annotation

    .prologue
    .line 60
    :try_start_0
    sget-object v6, Ljava/lang/System;->out:Ljava/io/PrintStream;

    invoke-virtual {p0}, Lweibo4android/http/Response;->asString()Ljava/lang/String;

    move-result-object v7

    invoke-virtual {v6, v7}, Ljava/io/PrintStream;->println(Ljava/lang/String;)V

    .line 61
    invoke-virtual {p0}, Lweibo4android/http/Response;->asJSONArray()Lweibo4android/org/json/JSONArray;

    move-result-object v3

    .line 62
    .local v3, list:Lweibo4android/org/json/JSONArray;
    invoke-virtual {v3}, Lweibo4android/org/json/JSONArray;->length()I

    move-result v4

    .line 63
    .local v4, size:I
    new-instance v0, Ljava/util/ArrayList;

    invoke-direct {v0, v4}, Ljava/util/ArrayList;-><init>(I)V

    .line 64
    .local v0, counts:Ljava/util/List;,"Ljava/util/List<Lweibo4android/Count;>;"
    const/4 v1, 0x0

    .local v1, i:I
    :goto_0
    if-lt v1, v4, :cond_0

    .line 67
    return-object v0

    .line 65
    :cond_0
    new-instance v6, Lweibo4android/Count;

    invoke-virtual {v3, v1}, Lweibo4android/org/json/JSONArray;->getJSONObject(I)Lweibo4android/org/json/JSONObject;

    move-result-object v7

    invoke-direct {v6, v7}, Lweibo4android/Count;-><init>(Lweibo4android/org/json/JSONObject;)V

    invoke-interface {v0, v6}, Ljava/util/List;->add(Ljava/lang/Object;)Z
    :try_end_0
    .catch Lweibo4android/org/json/JSONException; {:try_start_0 .. :try_end_0} :catch_0
    .catch Lweibo4android/WeiboException; {:try_start_0 .. :try_end_0} :catch_1

    .line 64
    add-int/lit8 v1, v1, 0x1

    goto :goto_0

    .line 68
    .end local v0           #counts:Ljava/util/List;,"Ljava/util/List<Lweibo4android/Count;>;"
    .end local v1           #i:I
    .end local v3           #list:Lweibo4android/org/json/JSONArray;
    .end local v4           #size:I
    :catch_0
    move-exception v2

    .line 69
    .local v2, jsone:Lweibo4android/org/json/JSONException;
    new-instance v6, Lweibo4android/WeiboException;

    invoke-direct {v6, v2}, Lweibo4android/WeiboException;-><init>(Ljava/lang/Exception;)V

    throw v6

    .line 70
    .end local v2           #jsone:Lweibo4android/org/json/JSONException;
    :catch_1
    move-exception v5

    .line 71
    .local v5, te:Lweibo4android/WeiboException;
    throw v5
.end method


# virtual methods
.method public equals(Ljava/lang/Object;)Z
    .locals 7
    .parameter "obj"

    .prologue
    const/4 v1, 0x1

    const/4 v2, 0x0

    .line 104
    if-ne p0, p1, :cond_1

    .line 113
    :cond_0
    :goto_0
    return v1

    .line 106
    :cond_1
    if-nez p1, :cond_2

    move v1, v2

    .line 107
    goto :goto_0

    .line 108
    :cond_2
    invoke-virtual {p0}, Ljava/lang/Object;->getClass()Ljava/lang/Class;

    move-result-object v3

    invoke-virtual {p1}, Ljava/lang/Object;->getClass()Ljava/lang/Class;

    move-result-object v4

    if-eq v3, v4, :cond_3

    move v1, v2

    .line 109
    goto :goto_0

    :cond_3
    move-object v0, p1

    .line 110
    check-cast v0, Lweibo4android/Count;

    .line 111
    .local v0, other:Lweibo4android/Count;
    iget-wide v3, p0, Lweibo4android/Count;->id:J

    iget-wide v5, v0, Lweibo4android/Count;->id:J

    cmp-long v3, v3, v5

    if-eqz v3, :cond_0

    move v1, v2

    .line 112
    goto :goto_0
.end method

.method public getComments()J
    .locals 2

    .prologue
    .line 76
    iget-wide v0, p0, Lweibo4android/Count;->comments:J

    return-wide v0
.end method

.method public getDm()J
    .locals 2

    .prologue
    .line 84
    iget-wide v0, p0, Lweibo4android/Count;->dm:J

    return-wide v0
.end method

.method public getFollowers()J
    .locals 2

    .prologue
    .line 92
    iget-wide v0, p0, Lweibo4android/Count;->followers:J

    return-wide v0
.end method

.method public getMentions()J
    .locals 2

    .prologue
    .line 88
    iget-wide v0, p0, Lweibo4android/Count;->mentions:J

    return-wide v0
.end method

.method public getRt()J
    .locals 2

    .prologue
    .line 80
    iget-wide v0, p0, Lweibo4android/Count;->rt:J

    return-wide v0
.end method

.method public hashCode()I
    .locals 7

    .prologue
    .line 97
    const/16 v0, 0x1f

    .line 98
    .local v0, prime:I
    const/4 v1, 0x1

    .line 99
    .local v1, result:I
    iget-wide v2, p0, Lweibo4android/Count;->id:J

    iget-wide v4, p0, Lweibo4android/Count;->id:J

    const/16 v6, 0x20

    ushr-long/2addr v4, v6

    xor-long/2addr v2, v4

    long-to-int v2, v2

    add-int/lit8 v1, v2, 0x1f

    .line 100
    return v1
.end method

.method public toString()Ljava/lang/String;
    .locals 3

    .prologue
    .line 117
    new-instance v0, Ljava/lang/StringBuilder;

    const-string v1, "Count{ id="

    invoke-direct {v0, v1}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    iget-wide v1, p0, Lweibo4android/Count;->id:J

    invoke-virtual {v0, v1, v2}, Ljava/lang/StringBuilder;->append(J)Ljava/lang/StringBuilder;

    move-result-object v0

    .line 118
    const-string v1, ", comments="

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    iget-wide v1, p0, Lweibo4android/Count;->comments:J

    invoke-virtual {v0, v1, v2}, Ljava/lang/StringBuilder;->append(J)Ljava/lang/StringBuilder;

    move-result-object v0

    .line 119
    const-string v1, ", rt="

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    iget-wide v1, p0, Lweibo4android/Count;->rt:J

    invoke-virtual {v0, v1, v2}, Ljava/lang/StringBuilder;->append(J)Ljava/lang/StringBuilder;

    move-result-object v0

    .line 120
    const-string v1, ", dm="

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    iget-wide v1, p0, Lweibo4android/Count;->dm:J

    invoke-virtual {v0, v1, v2}, Ljava/lang/StringBuilder;->append(J)Ljava/lang/StringBuilder;

    move-result-object v0

    .line 121
    const-string v1, ", mentions="

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    iget-wide v1, p0, Lweibo4android/Count;->mentions:J

    invoke-virtual {v0, v1, v2}, Ljava/lang/StringBuilder;->append(J)Ljava/lang/StringBuilder;

    move-result-object v0

    .line 122
    const-string v1, ", followers="

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    iget-wide v1, p0, Lweibo4android/Count;->followers:J

    invoke-virtual {v0, v1, v2}, Ljava/lang/StringBuilder;->append(J)Ljava/lang/StringBuilder;

    move-result-object v0

    .line 123
    const/16 v1, 0x7d

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(C)Ljava/lang/StringBuilder;

    move-result-object v0

    .line 117
    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    return-object v0
.end method
